home *** CD-ROM | disk | FTP | other *** search
/ Linux Cubed Series 8: LINUX Games / Linux Cubed Series 8 - LINUX Games.iso / games / video / zapem-0.000 / zapem-0 / zapem / projectile.h < prev    next >
C/C++ Source or Header  |  1995-03-30  |  777b  |  29 lines

  1. #ifndef PROJECTILE_H
  2. #define PROJECTILE_H
  3.  
  4. /* Requires weapon.h and sprite.h to be included */
  5.  
  6. const int MAXPROJECTILE=16;  // for any projectile weapon
  7.  
  8. class Projectile : public Weapon
  9. {
  10. protected:
  11.     Sprite beam[MAXPROJECTILE];    
  12.     int firerate;            // number of ticks between firings
  13.     Sprite* owner;            // sprite weapon is attached to 
  14.     int energy;            // How vicious is the gun?
  15.     int maxproj;            // How many projectiles on screen?
  16. public:
  17.     Projectile( Sprite* anchor, int rate, int energy, int maxproj);
  18.         virtual void replace(void);
  19.         virtual void move(void);
  20.         virtual void getBack(void);
  21.         virtual void paste(void);
  22.     virtual void fire(void);
  23.     bool collide(const Sprite &s);
  24.     virtual int getEnergy(void) const;
  25.     virtual void setSlot(int slot);
  26. };
  27.  
  28. #endif
  29.